﻿using System.Data.Entity.ModelConfiguration;
using yiCommerce.Core.Domain.Statuses;

namespace yiCommerce.Data.Mapping.Statuses
{
    public class StatusPictureMapping : EntityTypeConfiguration<StatusPicture>
    {
        public StatusPictureMapping()
        {
            this.ToTable("Status_Picture_Mapping");
            this.HasKey(pp => pp.Id);

            this.HasRequired(pp => pp.Picture);


            this.HasRequired(pp => pp.Status)
                .WithMany(p => p.StatusPictures)
                .HasForeignKey(pp => pp.StatusId);
        }
    }
}